#define content_jianshu()
<div class="box box-warning box-jianshu">
    <div class="box-header with-border">
        <h3 class="box-title">简书账号设置</h3>
        <div class="pull-right">
            <label>启用</label>
            <input type="hidden" id="jianshu" name="jianshu" value="#(jianshu.enable ?? false)"/>
            <input type="checkbox" id="jianshu_enable" class="switchery platform-enable" data-for="jianshu"
                   data-switchery="true" style="display: none;" #(jianshu.enable ? "checked" : "")/>
        </div>
    </div>
    <!-- /.box-header -->
    <div class="box-body">
        <!-- 简书账号ID - Slug -->
        <div class="col-xs-4">
            <div class="form-group col-xs-12">
                <label>Slug</label>
                <input type="text" id="jianshu_slug" class="form-control" value="#(jianshu.slug)" placeholder="1234567">
            </div>
            <!-- 同步文集 - notebook -->
            <div class="form-group col-xs-12">
                <label>文集ID</label>
                <input type="text" id="jianshu_notebook" class="form-control" value="#(jianshu.notebook)" placeholder="1234567">
            </div>
        </div>
        <!-- 简书Cookie设置 -->
        <div class="col-xs-8">
            <div class="form-group col-xs-12">
                <label>Cookie</label>
                <textarea class="form-control" id="jianshu_cookie" rows="5" placeholder="remember_user_token=xxxxxxxx;">#(jianshu.cookie)</textarea>
            </div>
        </div>
        <!-- /.box-body -->
    </div>
    <div class="box-footer">
        <button type="button" class="btn btn-default"
                onclick="doverify('jianshu', getJianshuConfObj())">
            <i class="fa fa-cog fa-spin fa-fw" style="display:none"></i>验证
        </button>
        <a href="https://www.jianshu.com/p/3e00f3178ee1" target="_blank">
            <i class="fa fa-fw fa-question-circle"></i>怎么找到这些配置
        </a>
        <button type="button" class="btn btn-info pull-right saveBtn"
                onclick="doSave('jianshu', getJianshuConfObj())">
            <i class="fa fa-cog fa-spin fa-fw" style="display:none"></i>保存
        </button>
    </div>
</div>
<script>
    function getJianshuConfObj(){
        return {
            "enable" : $('#jianshu_enable').is(":checked"),
            "slug" : $('#jianshu_slug').val(),
            "notebook" : $('#jianshu_notebook').val(),
            "cookie" : $('#jianshu_cookie').val()
        }
    }
</script>
#end
